<%@page import="com.wanmait.travel.vo.Tickit"%>
<%@page import="com.wanmait.travel.vo.ScenicTickitType"%>
<%@page import="com.wanmait.travel.vo.Province"%>
<%@page import="com.wanmait.travel.vo.Manager"%>
<%@page import="com.wanmait.travel.vo.Scenic"%>
<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%> 
<jsp:include page="/managerinc/header.jsp"></jsp:include>
  <%
  String path=request.getServletContext().getContextPath();
	Manager manager=(Manager)request.getSession().getAttribute("manager");
	ScenicTickitType stt = (ScenicTickitType)request.getAttribute("stt");
    	Scenic scenic=stt.getScenic();
    	Tickit tickitChild=stt.getTickitChild();
    	Tickit tickitOld=stt.getTickitOld();
    	Tickit tickitMan=stt.getTickitMan();
   %>
	<section>
	<div class="jingDian-from">
		<h2>景点修改</h2>
		<form action="<%=path %>/ScenicController?action=save"  method="post" enctype="multipart/form-data" >
		<fieldset>
				<label>景点名称</label>
				<input type="hidden" name="id" value="<%=scenic.getId()%>">
				<input type="text" name="name" value="<%=scenic.getName() %>" id="scenicN">
				<span id="sName"></span>
			</fieldset>
			<fieldset>
				<label>省</label>
				<select id="province" name="provinceId">
				<option value="<%=scenic.getProvinceId() %>"><%=scenic.getProvince().getName() %></option>
				</select>
			</fieldset>
			<fieldset>
				<label>市</label>
				<select id="city" name="cityId">
				<option value="<%=scenic.getCityId() %>"><%=scenic.getCity().getName() %></option>
				</select>
			</fieldset>
			<fieldset>
				<label>地址</label>
				<input type="text" value="<%=scenic.getLocation() %>" name="location">
				<span></span>
			</fieldset>
			<fieldset>
				<label>开业时间</label>
				<input type="text" id="openT" value="<%=scenic.getOpenTime() %>" name="openTime">
				<span id="openTime"></span>
			</fieldset>
			<fieldset>
				<label>闭店时间</label>
				<input type="text" id="closeT" value="<%=scenic.getCloseTime() %>" name="closeTime">
				<span id="closeTime"></span>
			</fieldset>
			<fieldset>
				<label>景点介绍</label>
				<textarea rows="10" cols="20" name="intro" ><%=scenic.getIntro() %></textarea>
			</fieldset>
			 <fieldset>
				<label>景点图片</label>
				<input type="button" value="选择您上传的图片" onclick="file.click()"   name="introPic">
				<input type="file" id="file" style="visibility:hidden">
			</fieldset>
			<fieldset>
				<label>景点Video</label>
				<input type="text" name="introVideo">
			</fieldset> 
			
			
			
			<%if(tickitChild!=null) {%>
				<fieldset>
				<label>儿童票：</label>
				<input type="hidden" value="1" name="tickitChild">
				<label>儿童票价格</label>
				<input type="text" id="price1" value="<%=tickitChild.getPrice() %>" name="priceChild">
				<span id="priceX1"></span>
				<label>儿童票数量</label>
				<input type="text" id="num1" value="<%=tickitChild.getNum() %>" name="numChild">
				<span id="numX1"></span>
				 </fieldset>
				 <%}else{ %>
				 <fieldset>
				<label>儿童票：</label>
				<input type="hidden" value="1" name="tickitChild">
				<label>儿童票价格</label>
				<input type="text" id="price1" value="整数或小数" name="priceChild">
				<span id="priceX1"></span>
				<label>儿童票数量</label>
				<input type="text" id="num1" value="整数" name="numChild">
				<span id="numX1"></span>
				 </fieldset>
				 <%} %>
				 
				 <%if(tickitMan!=null) {%>
				 <fieldset>
				<label>成人票类型：</label>
				<input type="hidden" value="2" name="tickitMan">
				<label>成人票价格</label>
				<input type="text" id="price2" value="<%=tickitMan.getPrice() %>" name="priceMan">
				<span id="priceX2"></span>
				<label>成人票数量</label>
				<input type="text" id="num2" value="<%=tickitMan.getNum() %>" name="numMan">
				<span id="numX2"></span>
			</fieldset> 
			<%}else{ %>
			 <fieldset>
				<label>成人票类型：</label>
				<input type="hidden" value="2" name="tickitMan">
				<label>成人票价格</label>
				<input type="text" id="price2" value="整数或小数" name="priceMan">
				<span id="priceX2"></span>
				<label>成人票数量</label>
				<input type="text" id="num2" value="整数" name="numMan">
				<span id="numX2"></span>
			</fieldset> 
			<%} %>
			
			
			<%if(tickitOld!=null) {%>
			<fieldset>
				<label>老年票类型：</label>
				<input type="hidden" value="3" name="tickitOld">
			
			<label>老年票价格</label>
				<input type="text" id="price3" value="<%=tickitOld.getPrice() %>" name="priceOld">
			 <span id="priceX3"></span>
				<label>老年票数量</label>
				<input type="text" id="num3" value="<%=tickitOld.getNum()%>" name="numOld">
				<span id="numX3"></span>
			</fieldset> 
			<%}else{%>
			<fieldset>
				<label>老年票类型：</label>
				<input type="hidden" value="3" name="tickitOld">
			
			<label>老年票价格</label>
				<input type="text" id="price3" value="整数或小数" name="priceOld">
			 <span id="priceX3"></span>
				<label>老年票数量</label>
				<input type="text" id="num3" value="整数" name="numOld">
				<span id="numX3"></span>
			</fieldset> 
			<%} %>
			<fieldset>
				<input type="submit" value="提交" >
			</fieldset>
	
		</form>
		</div>
	</section>
<jsp:include page="/managerinc/footer.jsp"></jsp:include>
<script type="text/javascript">

</script>